package com.znf4.controller.user.dto;
/*package com.znf4.platform.controller.user;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.znf4.platform.bank.enums.BankWayEnum;
import com.znf4.platform.common.core.dwz.DWZ;
import com.znf4.platform.common.core.dwz.DwzAjax;
import com.znf4.platform.common.core.enums.PayTypeEnum;
import com.znf4.platform.common.core.page.PageParam;
import com.znf4.platform.user.entity.RpUserBankAccount;
import com.znf4.platform.user.entity.RpUserBankWay;
import com.znf4.platform.user.entity.RpUserInfo;
import com.znf4.platform.user.exception.UserBizException;
import com.znf4.platform.user.service.RpUserBankAccountService;
import com.znf4.platform.user.service.RpUserBankWayService;
import com.znf4.platform.user.service.RpUserInfoService;

import java.util.Map;

*//**
 * TODO...  无注释
 *//*
@Controller
@RequestMapping("/user/bankWay")
public class UserBankWayController {
	private static final Log log = LogFactory.getLog(UserBankWayController.class);
	@Autowired
	private RpUserBankWayService rpUserBankWayService;
	@Autowired
	private RpUserBankAccountService rpUserBankAccountService;
	@Autowired
	private RpUserInfoService rpUserInfoService;

	*//**
	 * 函数功能说明 ： 查询分页数据
	 *
	 * @参数： @return
	 * @return String
	 * @throws
	 *//*
	@RequestMapping(value = "/list", method = { RequestMethod.POST, RequestMethod.GET })
	public String list(RpUserBankWay rpUserBankWay, PageParam pageParam, Model model) {
		model.addAttribute("pageBean", rpUserBankWayService.listPage(pageParam, rpUserBankWay));
		model.addAttribute("pageParam", pageParam);
		model.addAttribute("rpUserBankWay", rpUserBankWay);
		model.addAttribute("bankWayEnums", BankWayEnum.toList());
		model.addAttribute("payTypeEnums", PayTypeEnum.toList());
		return "user/bankWay/list";
	}

	*//**
	 * 前往添加页面
	 * 
	 * @param model
	 * @param userNo
	 * @return
	 *//*
	@RequiresPermissions("user:bankWay:add")
	@RequestMapping(value = "/addUI", method = { RequestMethod.POST, RequestMethod.GET })
	public String addUI(Model model, @RequestParam("userNo") String userNo) {
		model.addAttribute("userNo", userNo);
		model.addAttribute("bankWayEnums", BankWayEnum.toList());
		model.addAttribute("payTypeEnums", PayTypeEnum.toList());
		return "user/bankWay/add";
	}

	*//**
	 * 添加
	 * 
	 * @param model
	 * @param rpUserBankWay
	 * @return
	 *//*
	@RequiresPermissions("user:bankWay:add")
	@RequestMapping(value = "/add", method = { RequestMethod.POST, RequestMethod.GET })
	public String add(Model model, RpUserBankWay rpUserBankWay, DwzAjax dwz) {
		// 根据商户编号及银行通道获取附属信息
		RpUserBankWay userNoAndBankWay = rpUserBankWayService.getByUserNoAndBankWay(rpUserBankWay.getUserNo(), rpUserBankWay.getBankWay(), rpUserBankWay.getPayType());
		if (userNoAndBankWay != null) {
			throw new UserBizException(UserBizException.USER_BANK_WAY_ERROR, "已存在该通道附属信息");
		}
		// 新增数据
		rpUserBankWayService.saveRpUserBankWay(rpUserBankWay);
		dwz.setStatusCode(DWZ.SUCCESS);
		dwz.setMessage(DWZ.SUCCESS_MSG);
		model.addAttribute("dwz", dwz);
		return DWZ.AJAX_DONE;
	}

	*//**
	 * 前往修改页面
	 * 
	 * @param model
	 * @param rpUserBankWay
	 * @return
	 *//*
	@RequiresPermissions("user:bankWay:edit")
	@RequestMapping(value = "/editUI", method = { RequestMethod.POST, RequestMethod.GET })
	public String editUI(Model model, RpUserBankWay rpUserBankWay) {

		RpUserBankWay userNoAndBankWay = rpUserBankWayService.getByUserNoAndBankWay(rpUserBankWay.getUserNo(), rpUserBankWay.getBankWay(), rpUserBankWay.getPayType());
		if (userNoAndBankWay == null) {
			throw new UserBizException(UserBizException.USER_BANK_WAY_ERROR, "不存在该通道附属信息");
		}

		model.addAttribute("bankWayEnums", BankWayEnum.toList());
		model.addAttribute("payTypeEnums", PayTypeEnum.toList());
		model.addAttribute("rpUserBankWay", userNoAndBankWay);
		return "user/bankWay/edit";
	}

	*//**
	 * 修改
	 * 
	 * @param model
	 * @param rpUserBankWay
	 * @return
	 *//*
	@RequiresPermissions("user:bankWay:edit")
	@RequestMapping(value = "/edit", method = { RequestMethod.POST, RequestMethod.GET })
	public String edit(Model model, RpUserBankWay rpUserBankWay, DwzAjax dwz) {

		// 根据商户编号及银行通道获取附属信息
		RpUserBankWay userNoAndBankWay = rpUserBankWayService.getByUserNoAndBankWay(rpUserBankWay.getUserNo(), rpUserBankWay.getBankWay(), rpUserBankWay.getPayType());
		userNoAndBankWay.setSubMerchantNo(rpUserBankWay.getSubMerchantNo());
		userNoAndBankWay.setSubMerchantPayKey(rpUserBankWay.getSubMerchantPayKey());
		userNoAndBankWay.setBankDesc(rpUserBankWay.getBankDesc());
		rpUserBankWayService.updateRpUserBankWay(userNoAndBankWay);
		// 新增数据

		dwz.setStatusCode(DWZ.SUCCESS);
		dwz.setMessage(DWZ.SUCCESS_MSG);
		model.addAttribute("dwz", dwz);
		return DWZ.AJAX_DONE;
	}

	*//**
	 * 发送数据的页面添加页面
	 * 
	 * @param model
	 * @param userNo
	 * @return
	 *//*
	@RequiresPermissions("user:bankWay:add")
	@RequestMapping(value = "/sendInfoToBankUI", method = { RequestMethod.POST, RequestMethod.GET })
	public String sendInfoToBankUI(Model model, @RequestParam("userNo") String userNo) {
		model.addAttribute("userNo", userNo);
		model.addAttribute("zhiQingBankWay", BankWayEnum.toZhiQingList());
		return "user/bankWay/sendInfo";
	}

	*//**
	 * 上送数据
	 * 
	 * @param model
	 * @param userNo
	 * @return
	 *//*
	@RequiresPermissions("user:bankWay:add")
	@RequestMapping(value = "/sendInfoToBank", method = { RequestMethod.POST, RequestMethod.GET })
	public String sendInfoToBank(Model model, @RequestParam("userNo") String userNo, String bankWayCode, String rate, String settMode, DwzAjax dwz) {
		RpUserInfo userInfo = rpUserInfoService.getDataByMerchentNoAndStatus(userNo, null);
		RpUserBankAccount bankAccount = rpUserBankAccountService.getByUserNo(userNo, null);
		if (bankAccount == null) {
			dwz.setStatusCode(DWZ.ERROR);
			dwz.setMessage("请先维护商户的银行卡信息");
			model.addAttribute("dwz", dwz);
			return DWZ.AJAX_DONE;
		}

		Map<String, String> map = null;
		
//		if (bankWayCode.equals(bankWayCode)) {
		if (bankWayCode.equals("帶上送渠道編碼")) {
			RpUserBankWay bankWay = rpUserBankWayService.getByUserNoAndBankWay(userNo, bankWayCode, PayTypeEnum.SCANPAY_D0.name());
			//TODO 此处许实现对应渠道的子商户上送实现，实现完成后，需要将数据更新或插入到商户银行附属信息  RpUserBankWay
		} else {
			dwz.setStatusCode(DWZ.ERROR);
			dwz.setMessage("输入上送的通道注册接口不存在");
			model.addAttribute("dwz", dwz);
			return DWZ.AJAX_DONE;
		}

		model.addAttribute("respCode", map.get("respCode"));
		model.addAttribute("respDesc", map.get("respDesc"));
		model.addAttribute("respErrMsg", map.get("respErrMsg"));
		model.addAttribute("mcht_no", map.get("mcht_no"));
		model.addAttribute("secretKey", map.get("secretKey"));
		model.addAttribute("logInfo", map.get("logInfo"));
		return "user/bankWay/sendResult";
	}
}
*/